@GAP: 15px; // node horizontal gap
body,
html {
  font-family: 微软雅黑;
  padding: 0;
  margin: 0;
}

.map-container {
  user-select: none;
  overflow: scroll !important;
  font-size: 15px;
  &::-webkit-scrollbar {
    width: 0px;
    height: 0px;
  }
  .focus-mode {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #fff;
  }
  .map-canvas {
    height: 20000px;
    width: 20000px;
    position: relative;
    user-select: none;
    transition: all 0.3s;
    transform: scale(1);
    background: #f6f6f6;
    .selected {
      outline: 2px solid #4dc4ff;
    }
    root {
      position: absolute;
      tpc {
        color: rgb(255, 255, 255);
        padding: 10px @GAP;
        background-color: rgb(0, 170, 255);
        border-radius: 5px;
        font-size: 25px;
        [contentEditable] {
          position: absolute;
          top: 0;
          left: 0;
          background-color: rgb(0, 170, 255);
          max-width: 300px;
          z-index: 11;
          -webkit-user-select: auto;
        }
      }
    }
  }
  .box {
    & > grp {
      // for primary node
      position: absolute;
      & > t > tpc {
        background-color: rgb(255, 255, 255);
        border: 1px solid rgb(68, 68, 68);
        border-radius: 5px;
        color: rgb(115, 92, 69);
        padding: 8px 10px;
        margin: 0;
        [contentEditable] {
          position: absolute;
          top: 0;
          left: 0;
          background-color: #fff;
          max-width: 300px;
          margin: 9px @GAP + 10;
          z-index: 11;
          direction: ltr;
          -webkit-user-select: auto;
        }
      }
    }
    .left-side {
      direction: rtl;
      tpc {
        direction: ltr;
      }
    }
    grp {
      display: block;
      pointer-events: none;
    }
    children,
    t {
      display: inline-block;
      vertical-align: middle;
    }
    children {
      padding-bottom: 1px;
    }
    t {
      position: relative;
      cursor: pointer;
      padding: 0 @GAP;
      tpc {
        display: block;
        padding: 5px;
        margin-top: 10px;
        border-radius: 3px;
        color: rgb(102, 102, 102);
        pointer-events: all;
        max-width: 800px;
        [contentEditable] {
          position: absolute;
          top: 0;
          left: 0;
          background-color: #fff;
          max-width: 300px;
          margin: 15px @GAP;
          z-index: 11;
          direction: ltr;
          -webkit-user-select: auto;
        }
        .tags {
          direction: ltr;
          span {
            display: inline-block;
            border-radius: 3px;
            padding: 2px 4px;
            background: #d6f0f8;
            color: #276f86;
            margin: 0px;
            font-size: 12px;
            height: 16px;
            line-height: 16px;
            margin-right: 3px;
            margin-top: 2px;
          }
        }
        .icons {
          display: inline-block;
          direction: ltr;
          margin-right: 10px;
        }
      }
      epd {
        position: absolute;
        height: 12px;
        width: 12px;
        line-height: 12px;
        text-align: center;
        border-radius: 50%;
        border: 1px solid #4f4f4f;
        background-color: #fff;
        pointer-events: all;
        z-index: 9;
        &.minus {
          transition: all 0.3s;
          opacity: 0;
          &:hover {
            opacity: 1;
          }
        }
      }
    }
  }
  // iconfont
  .icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
  }
  .svg2nd,
  .svg3rd,
  .topiclinks,
  .linkcontroller {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
  }
  .topiclinks,
  .linkcontroller {
    pointer-events: none;
    g {
      pointer-events: all;
    }
  }
  .svg2nd,
  .svg3rd {
    pointer-events: none;
    z-index: -1;
  }

  .topiclinks,
  .linkcontroller {
    * {
      z-index: 100;
    }
  }
  .topiclinks {
    g {
      cursor: pointer;
    }
  }
}

// TODO For org chart
.down {
  t,
  children {
    display: block !important;
  }
  grp {
    display: inline-block !important;
  }
}

.circle {
  position: absolute;
  height: 10px;
  width: 10px;
  margin-top: -5px;
  margin-left: -5px;
  border-radius: 100%;
  background: #aaa;
  cursor: pointer;
}
